package com.gukun.springboot.tdengine.service.highvolume.pojo;

import com.gukun.springboot.tdengine.pojo.TagData;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * className:
 * desc:
 * user: gukun
 * date: 2024/10/8 20:18
 */
@Data
public class DemoTagData extends TagData {
    private String tagId;

    public DemoTagData(String tagName, long l, String number, byte b) {
        super(l, number, b);
        this.tagId = tagName;
    }

    @Override
    public String toString() {
        return "DemoTagData{" +
                "tagId='" + tagId + '\'' +
                ", ts=" + getTs() +
                ", v='" + getV() + '\'' +
                ", q=" + getQ() +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof DemoTagData)) return false;
        if (!super.equals(o)) return false;
        DemoTagData that = (DemoTagData) o;
        return getTagId().equals(that.getTagId());
    }
}
